package com.dsteiner.xelavos.client.domain;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.dsteiner.widgets.client.SuggestBoxWidget.Suggestion;
import com.dsteiner.widgets.client.domain.BaseObject;
import com.dsteiner.widgets.client.domain.ModelObject;
import com.dsteiner.widgets.client.rpc.SearchResult;
import com.dsteiner.xelavos.client.model.MainTabModel.Tab;

public class SearchInfo extends BaseObject{

	private Map<Tab, SearchResult<ModelObject>> tabSearchResults = new HashMap<Tab, SearchResult<ModelObject>>();
	private List<Suggestion> startWithSuggestions = new ArrayList<Suggestion>();
	private List<Suggestion> wordSuggestions = new ArrayList<Suggestion>();

	public SearchInfo() {
	}

	public void setTabSearchResults(Map<Tab, SearchResult<ModelObject>> tabSearchResults) {
		this.tabSearchResults = tabSearchResults;
	}
	
	public Map<Tab, SearchResult<ModelObject>> getTabSearchResults() {
		return tabSearchResults;
	}

	public void setStartWithSuggestions(List<Suggestion> suggestions) {
		this.startWithSuggestions = suggestions;
	}
	public List<Suggestion> getStartWithSuggestions() {
		return startWithSuggestions;
	}

	public void setWordSuggestions(List<Suggestion> wordSuggestions) {
		this.wordSuggestions = wordSuggestions;
	}
	
	public List<Suggestion> getWordSuggestions() {
		return wordSuggestions;
	}

	public boolean isEmpty() {
		return tabSearchResults.isEmpty() && startWithSuggestions.isEmpty() && wordSuggestions.isEmpty();
	}
}
